<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core">

<h:head>
	<title><h:outputText value="#{index.constant.siteName}" /></title>
	<script type="text/javascript" src="/ckeditor/ckeditor.js"></script>
</h:head>

<h:body>
	<h:form>
		<table>
			<tr>
				<td>fetch</td>
				<td>
					<h:inputText value="#{articleBean.url }" size="80"></h:inputText>
					<h:commandButton value="fetch" actionListener="#{articleBean.fetch}"></h:commandButton>
				</td>
			</tr>
		</table>
	</h:form>
	<h:form id="inputForm">
		<table border="1">
			<tr>
				<td>分类</td>
				<td><h:selectOneMenu value="#{articleBean.categoryId}">
					<f:selectItems value="#{categoryBean.selectItemList}"
						var="category" />
				</h:selectOneMenu></td>
			</tr>
			<tr>
				<td width="200px">标题</td>
				<td><h:inputText id="title" value="#{articleBean.article.title}"
					required="true" size="50"></h:inputText></td>
			</tr>
			<tr>
				<td>缩略图</td>
				<td></td>
			</tr>
			<tr>
				<td>关键字</td>
				<td><h:inputText id="keyWords" value="#{articleBean.article.keyWords}"></h:inputText></td>
			</tr>
			<tr>
				<td>作者</td>
				<td><h:inputText id="author" value="#{articleBean.article.author}"></h:inputText>
				<h:selectOneMenu>
					<f:selectItem itemValue="2" itemLabel="sdf" />
					<f:selectItem itemValue="5" itemLabel="sdsf" />
					<f:selectItem itemValue="7" itemLabel="sdfsd" />

				</h:selectOneMenu></td>
			</tr>
			<tr>
				<td>来源</td>
				<td><h:inputText id="from" value="#{articleBean.article.from}"></h:inputText>
				</td>
			</tr>
			<tr>
				<td>摘要</td>
				<td><h:inputTextarea id="description"
					value="#{articleBean.article.description}" cols="70" rows="8"></h:inputTextarea>
				</td>
			</tr>
			<tr>
				<td>内容</td>
				<td><h:inputTextarea id="content" required="true"
					class="ckeditor" name="editor1" value="#{articleBean.article.details.text}">
					<f:converter converterId="gTextConverter" />
				</h:inputTextarea></td>
			</tr>
			<tr>
				<td>分页方式</td>
				<td></td>
			</tr>
			<tr>
				<td>状态</td>
				<td><h:selectOneRadio required="true">
					<f:selectItem itemValue="1" itemLabel="发布" escape="false" />
					<f:selectItem itemValue="2" itemLabel="审核" />
					<f:selectItem itemValue="3" itemLabel="草稿" />
				</h:selectOneRadio></td>
			</tr>
			<tr>
				<td colspan="2"><h:commandButton
					action="#{articleBean.save}" value="提交"></h:commandButton> <input
					type="reset" /></td>
			</tr>
			<h:messages
				style="color: red;
                 font-family: 'New Century Schoolbook', serif;
                 font-style: oblique;
                 text-decoration: overline"></h:messages>
		</table>

	</h:form>
</h:body>
</html>